﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using ProjectBase.Core;

namespace $safeprojectname$
{
    /// <summary>html &lt;A&gt; element</summary>
    public class Anchor : ContentControl<ICoreModel, IVisualControl, Anchor>, ITableRowChild
    {
        #region constructor
        public Anchor(string cssClassName = null)
            : base(cssClassName) { }
        #endregion constructor

        #region Set
        public virtual Anchor SetName(string name)
        {
            Name = name;
            return this;
        }

        public virtual Anchor SetTarget(string target)
        {
            Target = target;
            return this;
        }

        public virtual Anchor SetHref(string href)
        {
            Href = href;
            return this;
        }
        #endregion Set

        #region properties
        protected override string TagName
        {
            get { return Tag.Anchor; }
        }

        public virtual string Target
        {
            get { return GetAttribute(Attr.Target); }
            set { SetAttribute(Attr.Target, value); }
        }

        public virtual string Name
        {
            get { return GetAttribute(Attr.Name); }
            set { SetAttribute(Attr.Name, value); }
        }

        public virtual string Href
        {
            get { return GetAttribute(Attr.Href); }
            set { SetAttribute(Attr.Href, value); }
        }
        #endregion properties
    }
}